// 创建一个名为 youth 的包
package youth;

// 基类 Human
class Human {
    protected String name;
    protected int age;
    protected String gender;

    public Human(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    // 自我介绍方法（基类方法）
    public void introduce() {
        System.out.println("大家好，我叫" + name + "，今年" + age + "岁，性别是" + gender + "。");
    }
}

// 派生类 OrdinaryYouth（普通青年）
class OrdinaryYouth extends Human {
    private String school;
    private String job;

    public OrdinaryYouth(String name, int age, String gender, String school, String job) {
        super(name, age, gender);
        this.school = school;
        this.job = job;
    }

    // 重写自我介绍方法
    @Override
    public void introduce() {
        super.introduce();
        System.out.println("我目前就读于" + school + "，并且正在从事" + job + "的工作。");
        System.out.println("我希望能在未来实现自己的职业梦想。");
    }
}

// 派生类 ArtisticYouth（文艺青年）
class ArtisticYouth extends Human {
    private String school;
    private String masterpiece;
    private String dream;

    public ArtisticYouth(String name, int age, String gender, String school, String masterpiece, String dream) {
        super(name, age, gender);
        this.school = school;
        this.masterpiece = masterpiece;
        this.dream = dream;
    }

    // 重写自我介绍方法
    @Override
    public void introduce() {
        super.introduce();
        System.out.println("我目前就读于" + school + "，我的代表作是《" + masterpiece + "》，");
        System.out.println("我的梦想是" + dream + "，希望通过努力实现自己毕生的心愿。");
    }
}

// 测试类 TestYouth
class TestYouth {
    public static void main(String[] args) {
        Human t1 = new OrdinaryYouth("魂天帝", 23, "男", "麻省理工大学", "斗帝级大厨师");
        Human t2 = new ArtisticYouth("药尘", 22, "男", "中州炼药大学", "焚诀", "成为九品炼药师");

        System.out.println("普通青年的自我介绍:");
        t1.introduce();

        System.out.println("\n文艺青年的自我介绍:");
        t2.introduce();
    }
}
